import {NativeModules,NativeEventEmitter, Platform} from 'react-native'
let FileReceive = NativeModules.FileReceive;
let eventEmitter = new NativeEventEmitter(FileReceive);

class RNFileReceive{

    static  async checkFile()
    {     
        FileReceive.checkFile()
    }
    static async copyFile(path,writePath,filename)
    {
        const res = await FileReceive.copyFile(path,writePath,filename)
        return res
    }
    static addListener(eventname,cb)
    {
       return   eventEmitter.addListener(eventname,cb)
    }
    static playRingtone()
    {
        FileReceive.playRingtone()
    }
}
export default  RNFileReceive
